home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 4
/
CDPD_IV.bin
/
e
/
mailinglists
/
amigae.0793july.archive
/
000114_crash!cup.port….com!Politikill_Fri, 30 Jul 93 13:56:36 PST.msg
< prev
next >
Wrap
Internet Message Format
|
1994-05-26
|
3KB
Received: by bkhouse.cts.com (V1.16/Amiga)
id AA00000; Fri, 30 Jul 93 13:56:36 PST
Received: from nova.unix.portal.com by crash.cts.com with smtp
(Smail3.1.28.1 #15) id m0oLzoW-0000auC; Fri, 30 Jul 93 12:08 PDT
Received: by nova.unix.portal.com (5.65b/4.1 1.386)
id AA22660; Fri, 30 Jul 93 12:12:20 -0700
Received: from hobo by portal.unix.portal.com (1.689)
id AA29910; Fri, 30 Jul 93 12:12:19 -0700
Received: by hobo.corp.portal.com (4.1/4.0.3 1.68)
id AA23438; Fri, 30 Jul 93 12:12:17 PDT
Return-Path: <Politikill@cup.portal.com>
Lines: 69
Date: Fri, 30 Jul 93 12:12:16 PDT
Message-Id: <9307301212.2.12188@cup.portal.com>
X-Origin: The Portal System (TM)
From: Politikill@cup.portal.com
To: AmigaE@bkhouse.cts.com
Subject: Re: MidStr
>Hi, Jeffrey. In response to your message:
>
>> I can't get MidStr() to work right. It is reading it from the starting
>>point right, but I can't get it to stop! I am trying to get a version string
>>pulled out of a buffer I am getting from Read(). Before vtst was defined as a
>>string, it was working somewhat well (I was getting what I wanted), but I am
>>not sure whether it was stoping where I wanted. What I need is the original
>>version string, with the revision number bumped up by one.
>
>=======================================================================
>
>PROC findver(pos) /* pos is found in the prior proc */
> DEF endpos,
> vers,
> per,
> vn,
> vp,
> vns,
> nvers,
> rvers,
> vtst[80]:STRING
>
> endpos:=InStr(filbuf,'\n',pos) /* finding then end of the line */
>******************************************************************************
*
>*** Your problem starts here. vers is uninitialized, so it contains a value
>*** that looks like an address. MidStr() copies characters to the nonexistent
>*** string at "address" vers. You need to declare these as STRING or allocate
>*** the using String(). Basically, this is copying characters into random
>*** memory locations, a very effective way to corrupt your memory :( I notice
d
>*** this happening in several places in the code that follows this statement.
I finally did this....now that routine, and the rest of my loading
sequence, are working well....I think I may have something in my saving
routine killing stuff now, so I have to go look there.
> MidStr(vers,filbuf,pos,endpos-pos)
>
>[statements removed]
>
>*** StringF() still might work under lucky circumstances.
> StringF(vtst,'\s \d.\d',nvers,vp,rvers)
The problem was that it would only crash on the second load, most of the
time, so I thought I was not deallocating memory....other occurrences of
StringF not having things defined as string...any exterminators for hire here?
>*** As for your run-on problem, it may be a symptom of this. If it persists
>*** then post, post again! :-)
Got this fixed....realised it ten minutes after the message went out!
>
>Later.
>-- Barry
/ / /
/_/_/iZ
MODULE 'WiZkId'
PROC main()
wizkid.inetaddress:='Politkill@cup.portal.com'
wizkid.realname:='Jeffrey J Peden ]['
ENDPROC
*-- GammaTag Version 2.8 --*
*-- Mister! Here's your mule!